package com.woniu.server.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 申请产品详细表
 * @TableName application_product
 */
@TableName(value ="application_product")
@Data
public class ApplicationProduct implements Serializable {
    /**
     * 表id
     */
    @TableId(type = IdType.AUTO)
    private Integer applicationProductId;

    /**
     * 表code
     */
    private String applicationProductCode;

    /**
     * 申请表code
     */
    private String projectApplicationCode;

    /**
     * 1：总监审批；2：经理审批；3：完成
     */
    private Integer status;

    /**
     * 项目名称
     */
    private String projectName;

    /**
     * 项目类型 1:一次研发；2：二次研发
     */
    private Integer projectType;

    /**
     * 目标客户群体
     */
    private String targetCustomer;

    /**
     * 目标市场
     */
    private String targetMarket;

    /**
     * 产品code
     */
    private String productCode;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 预计成本
     */
    private BigDecimal projectedCost;

    /**
     * 预计售价
     */
    private BigDecimal sellPrice;

    /**
     * 预计盈利
     */
    private BigDecimal projectedProfit;

    /**
     * 产品物料
     */
    private String productMaterial;

    /**
     * 产品描述
     */
    private String productDescription;

    /**
     * 创建人
     */
    private String createdBy;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 更新人
     */
    private String updatedBy;

    /**
     * 更新时间
     */
    private Date updatedTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ApplicationProduct other = (ApplicationProduct) that;
        return (this.getApplicationProductId() == null ? other.getApplicationProductId() == null : this.getApplicationProductId().equals(other.getApplicationProductId()))
            && (this.getApplicationProductCode() == null ? other.getApplicationProductCode() == null : this.getApplicationProductCode().equals(other.getApplicationProductCode()))
            && (this.getProjectApplicationCode() == null ? other.getProjectApplicationCode() == null : this.getProjectApplicationCode().equals(other.getProjectApplicationCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getProjectName() == null ? other.getProjectName() == null : this.getProjectName().equals(other.getProjectName()))
            && (this.getProjectType() == null ? other.getProjectType() == null : this.getProjectType().equals(other.getProjectType()))
            && (this.getTargetCustomer() == null ? other.getTargetCustomer() == null : this.getTargetCustomer().equals(other.getTargetCustomer()))
            && (this.getTargetMarket() == null ? other.getTargetMarket() == null : this.getTargetMarket().equals(other.getTargetMarket()))
            && (this.getProductCode() == null ? other.getProductCode() == null : this.getProductCode().equals(other.getProductCode()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getProjectedCost() == null ? other.getProjectedCost() == null : this.getProjectedCost().equals(other.getProjectedCost()))
            && (this.getSellPrice() == null ? other.getSellPrice() == null : this.getSellPrice().equals(other.getSellPrice()))
            && (this.getProjectedProfit() == null ? other.getProjectedProfit() == null : this.getProjectedProfit().equals(other.getProjectedProfit()))
            && (this.getProductMaterial() == null ? other.getProductMaterial() == null : this.getProductMaterial().equals(other.getProductMaterial()))
            && (this.getProductDescription() == null ? other.getProductDescription() == null : this.getProductDescription().equals(other.getProductDescription()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime()))
            && (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
            && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getApplicationProductId() == null) ? 0 : getApplicationProductId().hashCode());
        result = prime * result + ((getApplicationProductCode() == null) ? 0 : getApplicationProductCode().hashCode());
        result = prime * result + ((getProjectApplicationCode() == null) ? 0 : getProjectApplicationCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getProjectName() == null) ? 0 : getProjectName().hashCode());
        result = prime * result + ((getProjectType() == null) ? 0 : getProjectType().hashCode());
        result = prime * result + ((getTargetCustomer() == null) ? 0 : getTargetCustomer().hashCode());
        result = prime * result + ((getTargetMarket() == null) ? 0 : getTargetMarket().hashCode());
        result = prime * result + ((getProductCode() == null) ? 0 : getProductCode().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getProjectedCost() == null) ? 0 : getProjectedCost().hashCode());
        result = prime * result + ((getSellPrice() == null) ? 0 : getSellPrice().hashCode());
        result = prime * result + ((getProjectedProfit() == null) ? 0 : getProjectedProfit().hashCode());
        result = prime * result + ((getProductMaterial() == null) ? 0 : getProductMaterial().hashCode());
        result = prime * result + ((getProductDescription() == null) ? 0 : getProductDescription().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode());
        result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
        result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", applicationProductId=").append(applicationProductId);
        sb.append(", applicationProductCode=").append(applicationProductCode);
        sb.append(", projectApplicationCode=").append(projectApplicationCode);
        sb.append(", status=").append(status);
        sb.append(", projectName=").append(projectName);
        sb.append(", projectType=").append(projectType);
        sb.append(", targetCustomer=").append(targetCustomer);
        sb.append(", targetMarket=").append(targetMarket);
        sb.append(", productCode=").append(productCode);
        sb.append(", productName=").append(productName);
        sb.append(", projectedCost=").append(projectedCost);
        sb.append(", sellPrice=").append(sellPrice);
        sb.append(", projectedProfit=").append(projectedProfit);
        sb.append(", productMaterial=").append(productMaterial);
        sb.append(", productDescription=").append(productDescription);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", createdTime=").append(createdTime);
        sb.append(", updatedBy=").append(updatedBy);
        sb.append(", updatedTime=").append(updatedTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}